<?php include PATH_TPL."/admin/tpl.header.phtml"?>
<div class="main-container inner">
    <div class="main-content">
        <div class="container-fluid">
            <div class="row bt">
                <div class="col-lg-12 bg">
                    <ol class="breadcrumb">
                        <li class="active">
                            <i class="fa  fa-fw fa-reorder"></i>修改课程信息
                        </li>
                    </ol>
                </div>
            </div>
            <div id="page-wrapper">
                <div class="container-fluid col-md-7 col-sx-12">
                    <form action="/admin_feedback/edit" method="post" enctype="multipart/form-data">
                        <div class="form-group ">
                            <label for="name">反馈人名字</label>
                            <input type="text" placeholder="反馈人名字" id="name" class="form-control" name="name" value="<?=$tRow['name']?>" readonly>
                        </div>
                        <div class="form-group">
                            <label for="phone">反馈人手机号</label>
                            <input type="text" placeholder="反馈人手机号" id="phone" class="form-control" name="phone" value="<?=$tRow['phone']?>" readonly>
                        </div>
                        <div class="form-group">
                            <label for="content">反馈内容</label>
                            <textarea id="content" style="height:200px;resize:none;" class="form-control" name="content" placeholder="输入描述" readonly><?=$tRow['content']?></textarea>
                        </div>
                        <div class="form-group">
                            <label for="status">处理状态&nbsp;&nbsp;&nbsp;</label>
                            <input type="radio" name="status" value="0" <?=empty($tRow['status'])?'checked':''?>>未处理&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="status" value="1" <?=empty($tRow['status'])?'':'checked'?>>已处理&nbsp;&nbsp;&nbsp;
                        </div>
                        <div class="form-group">
                            <label for="sessions">会话交互内容</label>
                            <textarea id="sessions" style="height:200px;resize:none;" class="form-control" name="sessions"><?=$tRow['sessions']?></textarea>
                        </div>
                        <div class="form-group">
                            <label>处理时间</label>
                            <div class="input-group date datetimeEnd col-md-12" data-date="<?=date('Y-m-d H:i',time())?>" data-date-format="yyyy-mm-dd hh:ii" data-link-field="updated">
                            <input class="form-control" size="16" type="text" value="<?=date('Y-m-d H:i',empty($tRow['updated'])?time():$tRow['updated'])?>" readonly>
                                <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
                                <span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
                            </div>
                            <input type="hidden" id="updated" value="<?=date('Y-m-d H:i',empty($tRow['updated'])?time():$tRow['updated'])?>" name="updated"/><br/>
                        </div>


                       <input type='hidden' value='<?=$tId?>' name='id'/>
                        <button class="btn btn-primary demo_2" type="button" id="submit">修改</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="subviews">
            <div class="subviews-container"></div>
        </div>
    </div>
    <!-- end: PAGE -->
</div>
<!-- end: MAIN CONTAINER -->
<script type="text/javascript" src="/plugins/jquery-ui-1.11.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="/plugins/datetimepicker/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="/plugins/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
$('.datetimeEnd').datetimepicker({
    language:  'zh-CN',
    weekStart: 1,
    todayBtn:  1,
    autoclose: 1,
    todayHighlight: 1,
    startView: 2,
    minView: 0,
    format:'yyyy-mm-dd hh:ii',
    pickerPosition: "top-right",
    forceParse: 0
});
</script>


<script>
$(function(){
    var options={
        beforeSubmit : showRequest,    // 提交前的回调函数
        success : showResponse,    // 提交后的回调函数
        dataType : "json",    // html（默认）、xml、script、json接受服务器端返回的类型
    }
    function showRequest(formData, jqForm, options){
        return true;
    }
    function showResponse(responseText,statusText){
            cg_alert_edit(responseText,'/admin_feedback','/admin_feedback/edit?id=<?=$tId?>');
    }
    $('#submit').click(function() {
        $('form').ajaxSubmit(options);
        return false;

    });
});

</script>
<?php include PATH_TPL."/admin/tpl.footer.phtml"?>
